"""
URL configuration for boss_backend project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""


from django.urls import path
from resume.views import (
    ResumeCreateAPIView,
    ResumeDetailAPIView,
    ResumeUpdateErrorAPIView
)

from resume import views

urlpatterns = [
    # path('admin/', admin.site.urls),
    # 在 resume\urls.py 中
    path('resume_create', views.ResumeCreateAPIView.as_view(), name='ResumeCreat'),
    path('resumes/create/',ResumeCreateAPIView.as_view(),name='resume-create'),
    # 查看简历列表：GET /api/resumes/
    path('resumes/', ResumeDetailAPIView.as_view(), name='resume-list'),
    # 查看详情/更新：GET/PATCH /api/resumes/<id>/
    path('resumes/<int:resume_id>/',ResumeDetailAPIView.as_view(),name='resume-detail-update'),
    # 兼容旧路径：PATCH /api/resumes/update/<id>/
    path('resumes/update/<int:resume_id>/',ResumeDetailAPIView.as_view(),name='resume-update-legacy'),
    # 处理错误调用：PATCH /api/resumes/update/ (不带ID)
    path('resumes/update/',ResumeUpdateErrorAPIView.as_view(),name='resume-update-error'),
]